package com.aya.transaction.service;

import com.aya.transaction.mapper.BlogMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class BlogNoTransactionService {
    @Resource
    BlogMapper blogMapper;

    public int updateById(String id, String content) {
        return blogMapper.updateById(id, content);
    }

    public void updateByIdWithException(String id, String content) {
        blogMapper.updateById(id, content);
        throw new RuntimeException("抛出异常不会回滚数据");
    }
}
